package com.example.administrator.boltshow.viewone;/*
 *@创建者 lnn
 *@创建时间2016/8/3021:43
 *@描述 ${TODO}
*/

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.Window;

import com.example.administrator.boltshow.R;

public class MyDialog extends Dialog {
    private Context mContext;
    /**
     * <li> 构造函数 </li>
     *
     * @param context
     * @param view    供显示的View
     * @param cancel  点击外部区域是否可取消
     */
    @SuppressWarnings("deprecation")
    public MyDialog(Context context, View view, boolean cancel) {
        super(context, R.style.MyDialog);
        setContentView(view);
        setCanceledOnTouchOutside(cancel);
        Window window = getWindow();
        window.setGravity(Gravity.CENTER); // 此处可以设置dialog显示的位置
        window.setWindowAnimations(R.style.DialogBottom); // 添加动
        window.setLayout(600, 950);
    }
}
